package com.xxxx.myproject.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @RequestMapping("/")
    @PreAuthorize("hasAuthority('sys:admin')")
    public String hello(){
        System.out.println("-----");
        return "hello";
    }
}
